package com.library.utils
{
	import flash.display.DisplayObject;
	import flash.filters.BitmapFilterQuality;
	import flash.filters.BlurFilter;
	import flash.filters.DropShadowFilter;
	
	
	public class Filter
	{
		public function Filter(){}
		
		public static function setFilter(obj:DisplayObject):void{
            var color:uint = 0x000000;
            var angle:Number = 45;
            var alpha:Number = 0.7;
            var blurX:Number = 18;
            var blurY:Number = 18;
            var distance:Number = 0;
            var strength:Number = 0.65;
            var inner:Boolean = false;
            var knockout:Boolean = false;
            var quality:uint = BitmapFilterQuality.HIGH;
            var filter:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha, blurX, blurY, strength, quality, inner, knockout);
            var filterArr:Array = new Array();
            filterArr.push(filter);
            obj.filters = filterArr;
        }
        
        public static function setFilterSmall(obj:DisplayObject):void{
            var color:uint = 0x000000;
            var angle:Number = 0;
            var alpha:Number = 1.0;
            var blurX:Number = 4;
            var blurY:Number = 4;
            var distance:Number = 1;
            var strength:Number = 0.85;
            var inner:Boolean = false;
            var knockout:Boolean = false;
            var quality:uint = BitmapFilterQuality.HIGH;
            var filter:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha, blurX, blurY, strength, quality, inner, knockout);
            var filterArr:Array = new Array();
            filterArr.push(filter);
            obj.filters = filterArr;
        }
		
		public static function setBlur(obj:DisplayObject, blurX:int, blurY:int, quality:int):void{
            var filter:BlurFilter = new BlurFilter(blurX, blurY, quality);
            var filterArr:Array = new Array();
            filterArr.push(filter);
            obj.filters = filterArr;
        }
	}
}